--TEST--
bool MySQLndUhConnection::ping(resource $connection)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
	require_once('config.inc');

	class proxy extends MySQLndUhConnection {
		public function ping($res) {
			printf("%s(%s)\n", __METHOD__, var_export(func_get_args(), true));
			var_dump($ret = parent::ping($res));
			return $ret;
		}
	}

	class proxy2 extends MySQLndUhConnection {
		public function ping($res) {
			return $res;
		}
	}

	class proxy3 extends MySQLndUhConnection {
		public function ping($res) { }
	}

	class proxy4 extends MySQLndUhConnection {
		public function ping($res) {
			return true;
		}
	}

	$conn = mysqlnd_uh_test\connect::mysqli();
	var_dump($conn->ping());
	mysqlnd_uh_test\query_test::mysqli($conn);

	mysqlnd_uh_set_connection_proxy(new proxy());
	var_dump($conn->ping());
	mysqlnd_uh_test\query_test::mysqli($conn);

	mysqlnd_uh_set_connection_proxy(new proxy2());
	var_dump($conn->ping());
	mysqlnd_uh_test\query_test::mysqli($conn);

	mysqlnd_uh_set_connection_proxy(new proxy3());
	var_dump($conn->ping());

	mysqlnd_uh_set_connection_proxy(new proxy4());
	$conn->kill($conn->thread_id);
	var_dump($conn->ping());

	print "done!";
?>
--EXPECTF--
bool(true)
proxy::ping(array (
  0 => NULL,
))
bool(true)
bool(true)

Warning: mysqli::ping(): (MySQLnd User Handler) The method MySQLndUhConnection::ping() did not return a boolean value as it should in %s on line %d
bool(true)

Warning: mysqli::ping(): (MySQLnd User Handler) The method MySQLndUhConnection::ping() did not return a boolean value as it should in %s on line %d
bool(false)
bool(true)
done!